﻿@model www.SService.RelaxAdvertiseDataContract
@{
    ViewBag.Title = "Cập nhật quảng cáo | Logo | Slide show | Banner";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<fieldset>
    <legend>Sửa thông tin</legend>
    <div class="clear"></div>
    @using (Html.BeginForm("Edit", "Advertise", FormMethod.Post, new { id = "frmAdd", enctype = "multipart/form-data" }))
    {
          @Html.Hidden("id",Model.Id)
        <div class="row">
            <div class="col-left">Loại</div>
            <div class="col-right">@Html.DropDownList("Type", null, new { @class = "combobox" })
                <span class="red">*</span>
            </div>
        </div>
        <div class="row">
            <div class="col-left">Tên</div>
            <div class="col-right">@Html.TextBox("txtName", Model.Name, new { @class = "textbox" })
                <span class="red">*</span>
            </div>
        </div>
        <div class="row">
            <div class="col-left">Hình ảnh</div>
            <div class="col-right">
                <input type="file" name="fufile" id="fufile" style="width: 100%;" /><span class="red">*</span>
            </div>
        </div>
        <div class="row">
            <div class="col-left">Liên kết</div>
            <div class="col-right">@Html.TextBox("txtLink", Model.Link, new { @class = "textbox" })<span class="error"></span><span class="red">*</span></div>
        </div>
        <div class="row">
            <div class="col-left">Kiểu liên kết</div>
            <div class="col-right">@Html.DropDownList("LinkType", null, new { @class = "combobox" })<span class="red">*</span></div>
        </div>
        <div class="decription">
            <div class="col-left">Mô tả</div>
            <div class="col-right">@Html.TextArea("txtDecription", Model.Decription, new { @class = "textarea" })</div>
        </div>
        <div class="row">
            <div class="col-left">Thứ tự</div>
            <div class="col-right">@Html.TextBox("txtOrd", Model.Ord, new { @class = "textbox", onkeyup = "javascript:checkNumber(this);" })</div>
        </div>
        <div class="row">
            <div class="col-left">Giá</div>
            <div class="col-right">@Html.TextBox("txtPrice", Model.Price, new { @class = "textbox" })</div>
        </div>
        <div class="row">
            <div class="col-left">Ngày bắt đầu</div>
            <div class="col-right">@Html.TextBox("txtFromDate", Model.FromDate.ToShortDateString(), new { @class = "textbox" })</div>
        </div>
        <div class="row">
            <div class="col-left">Ngày kết thúc</div>
            <div class="col-right">@Html.TextBox("txtToDate", Model.ToDate.ToShortDateString(), new { @class = "textbox" })</div>
        </div>
        <div class="row">
            <div class="col-left">Trạng thái</div>
            <div class="col-right">@Html.CheckBox("chkActive",Model.Active==1)</div>
        </div>
        <div class="row">
            <div class="col-left"></div>
            <div class="col-right">
                <input type="submit" id="Submit1" class="button" name="submit1" value="Cập nhật" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@Html.ActionLink("Hủy", "Index", "Advertise")
            </div>
        </div>
    }
</fieldset>
